//
//  SocketRequest.h
//  TengyunStation
//
//  Created by Johnny on 15/8/21.
//  Copyright (c) 2015年 xingrong. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GCDAsyncSocket.h"
#import "SocketMethod.h"
#import "TSHeader.h"
#import "DSToast.h"
#import "UITableView+Activity.h"
#import "ToastActivity.h"

@protocol SocketRequestDelegate <NSObject>

- (void)socket:(GCDAsyncSocket *)socket Code:(NSString *)code Msg:(NSString *)msg Data:(NSData *)data;
- (void)socket:(GCDAsyncSocket *)socket Msg:(NSString *)msg;

@end

@interface SocketRequest : NSObject<GCDAsyncSocketDelegate> {
    NSMutableArray *_socketQueue;
}

@property(nonatomic,weak)id<SocketRequestDelegate>delegate;
@property(nonatomic,readonly,assign)BOOL isDisconnectAll;//判断是否所有的网络请求全部完成

- (id)initWithSocketRequestDelegate:(id<SocketRequestDelegate>)delegate;
- (void)addSocketData:(NSData *)data SocketTag:(NSInteger)tag;
- (void)addMultipleSocketData:(NSData *)data SocketTag:(NSInteger)tag;

@end
